home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wlib11_2.zip / EXAMPLES.EXE / EXAM43.C < prev    next >
C/C++ Source or Header  |  1991-03-13  |  1KB  |  28 lines

  1.    #include "window.h"
  2.    #define NORM   CREATE_VIDEO_ATTRIBUTE(black,white)  /* define  video
  3.                                                           attribute */
  4.    #define BLUEONBLACK  CREATE_VIDEO_ATTRIBUTE(black,blue)  /* define
  5.                                                            video attribute */
  6.  
  7.    main()
  8.    {
  9.      WPOINTER w;             /* pointer to a window structure */
  10.      WindowInitializeSystem();     /* system initialization function */
  11.      WindowSaveInitial(0);
  12.      w = WindowInitialize(BORDER,1,1,30,10,BLUEONBLACK,NORM,SINGLEBOX);
  13.      WindowOpen(w);              /* display window on the screen */
  14.      WindowWriteString(w,"Press a key to slide right",1,1);
  15.      WindowDisplay(w,1,NOEFFECT);
  16.      GET_KEY();
  17.      WindowSlide(w,RIGHT,20);
  18.      WindowWriteString(w,"Press a key to slide down",2,1);
  19.      GET_KEY();
  20.      WindowSlide(w,DOWN,10);
  21.      WindowWriteString(w,"Press a key to slide left",3,1);
  22.      GET_KEY();
  23.      WindowSlide(w,LEFT,20);
  24.      WindowWriteString(w,"Press a key to slide up",4,1);
  25.      GET_KEY();
  26.      WindowSlide(w,UP,20);
  27.    }
  28.